package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_job - 定时任务调度表
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_job" remark = "定时任务调度表", autoResultMap = true)
public class SysJobDO {
  @Entity.Column(value = "job_id", id = true, remark = "任务ID", updatable = false, insertable = false)
  private Long jobId;

  @Entity.Column(value = "job_name", id = true, remark = "任务名称", updatable = false, insertable = false)
  private String jobName;

  @Entity.Column(value = "job_group", id = true, remark = "任务组名", updatable = false, insertable = false)
  private String jobGroup;

  @Entity.Column(value = "invoke_target", remark = "调用目标字符串")
  private String invokeTarget;

  @Entity.Column(value = "cron_expression", remark = "cron执行表达式")
  private String cronExpression;

  @Entity.Column(value = "misfire_policy", remark = "计划执行错误策略（1立即执行 2执行一次 3放弃执行）")
  private String misfirePolicy;

  @Entity.Column(value = "concurrent", remark = "是否并发执行（0允许 1禁止）")
  private String concurrent;

  @Entity.Column(value = "status", remark = "状态（0正常 1暂停）")
  private String status;

  @Entity.Column(value = "create_by", remark = "创建者")
  private String createBy;

  @Entity.Column(value = "create_time", remark = "创建时间", jdbcType = JdbcType.TIMESTAMP)
  private Date createTime;

  @Entity.Column(value = "update_by", remark = "更新者")
  private String updateBy;

  @Entity.Column(value = "update_time", remark = "更新时间", jdbcType = JdbcType.TIMESTAMP)
  private Date updateTime;

  @Entity.Column(value = "remark", remark = "备注信息")
  private String remark;

}
